﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Imaginecup.recycling.Object.Entity;
using Imaginecup.Recycling.GameMan;
using Imaginecup.recycling.Object.Menu;

namespace Imaginecup.gameState.recycling.Sprite
{
    public class NormalSprite : ISprite
    {
        ObjectInfo m_SpriteInfo;
        String m_TextureName;

        public NormalSprite( ObjectInfo spriteInfo, String textureName)
        {
            m_SpriteInfo = spriteInfo;
            m_TextureName = textureName;
        }

        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            Texture2D texture = ResourceManager.GetInstance().GetContent(m_TextureName);
            spriteBatch.Begin();

            spriteBatch.Draw(texture, m_SpriteInfo.WorldLocation, m_SpriteInfo.ImageRectangle, Color.White);

            spriteBatch.End();
        }

        public ObjectInfo GetInfo()
        {
            return m_SpriteInfo;
        }
    }
}
